using UniversalAdmin.Application.Dto;
using UniversalAdmin.Application.Commands;
using System.Threading.Tasks;

namespace UniversalAdmin.Application.Services;

public interface IAppRoleServices
{
    Task<ApiResult> CreateAsync(CreateRoleDto dto);
    Task<ApiResult> UpdateRoleAsync(Guid id, UpdateRoleDto dto);
    Task<ApiResult> DeleteRoleAsync(Guid id);
    Task<ApiResult> EnableRole(Guid id);
    Task<ApiResult> DisableRole(Guid id);
    Task<ApiResult> AssignPermission(Guid roleId, string permissionCode);
    Task<ApiResult> AssignPermissions(Guid roleId, List<Guid> permissionIds);
    Task<ApiResult<PagedResult<RoleDto>>> GetPagedAsync(PagedQuery query);
    Task<ApiResult<IEnumerable<RoleDto>>> GetAllAsync(string? search = null);
    Task<RoleDto> GetByRoleId(Guid id);
    Task<ApiResult<RoleDto>> GetByIdAsync(Guid id);
    Task<ApiResult> UpdateAsync(Guid id, UpdateRoleDto dto);
    Task<ApiResult> DeleteAsync(Guid id);
}